<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<script type="text/javascript">
			
			function test(val){
				var inp = document.getElementById('ipu')
				let vals = val.value
				var regExp=/^[1-9][0-9]*$/
				var ok = regExp.test(vals)
				if(!ok){
					inp.value = 1
				}else{
					if(val.value>64){
						inp.value = 1
					}
				}
			}
		</script>
		<input id="ipu"  type="number" onblur="test(this)" value="1" />
	</body>
</html>
